package cn.tb.org.service.impl;

import cn.tb.basic.service.impl.BaseServiceImpl;
import cn.tb.basic.util.PageList;
import cn.tb.org.domain.DictionaryDetail;
import cn.tb.org.mapper.DictionaryDetailMapper;
import cn.tb.org.query.DictionaryDetailQuery;
import cn.tb.org.service.IDictionaryDetailSerivce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryDetailService extends BaseServiceImpl<DictionaryDetail> implements IDictionaryDetailSerivce {

    @Autowired
    private DictionaryDetailMapper dictionaryDetailMapper;
    @Override
    public PageList<DictionaryDetail> loadByTypeId(DictionaryDetailQuery query) {
        Long total = dictionaryDetailMapper.queryCount(query);
        List<DictionaryDetail> rows = dictionaryDetailMapper.loadByTypeId(query);
        return new PageList<DictionaryDetail>(total,rows);
    }
}
